Integrand size = 25, antiderivative size = 72 \[ \int \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)} \, dx=\frac {\text {arctanh}\left (\frac {\sin (c+d x)}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{d}-\frac {\sqrt {\cos (c+d x)} \sin (c+d x)}{d \sqrt {1-\cos (c+d x)}} \]
arctanh(sin(d*x+c)/(1-cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2))/d-sin(d*x+c)*cos (d*x+c)^(1/2)/d/(1-cos(d*x+c))^(1/2)
Result contains complex when optimal does not.
Time = 0.33 (sec) , antiderivative size = 155, normalized size of antiderivative = 2.15 \[ \int \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)} \, dx=-\frac {i \sqrt {2} \left (\left (1+e^{i (c+d x)}\right ) \sqrt {1+e^{2 i (c+d x)}}-e^{i (c+d x)} \text {arcsinh}\left (e^{i (c+d x)}\right )-e^{i (c+d x)} \text {arctanh}\left (\sqrt {1+e^{2 i (c+d x)}}\right )\right ) \sqrt {\cos (c+d x) \sin ^2\left (\frac {1}{2} (c+d x)\right )}}{d \left (-1+e^{i (c+d x)}\right ) \sqrt {1+e^{2 i (c+d x)}}} \]
((-I)*Sqrt[2]*((1 + E^(I*(c + d*x)))*Sqrt[1 + E^((2*I)*(c + d*x))] - E^(I* (c + d*x))*ArcSinh[E^(I*(c + d*x))] - E^(I*(c + d*x))*ArcTanh[Sqrt[1 + E^( (2*I)*(c + d*x))]])*Sqrt[Cos[c + d*x]*Sin[(c + d*x)/2]^2])/(d*(-1 + E^(I*( c + d*x)))*Sqrt[1 + E^((2*I)*(c + d*x))])
Time = 0.34 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 3249, 3042, 3254, 220}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {1-\sin \left (c+d x+\frac {\pi }{2}\right )} \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3249 |
\(\displaystyle -\frac {1}{2} \int \frac {\sqrt {1-\cos (c+d x)}}{\sqrt {\cos (c+d x)}}dx-\frac {\sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {1-\cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {1}{2} \int \frac {\sqrt {1-\sin \left (c+d x+\frac {\pi }{2}\right )}}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx-\frac {\sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {1-\cos (c+d x)}}\) |
\(\Big \downarrow \) 3254 |
\(\displaystyle -\frac {\int \frac {1}{\frac {\sin (c+d x) \tan (c+d x)}{1-\cos (c+d x)}-1}d\frac {\sin (c+d x)}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}}{d}-\frac {\sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {1-\cos (c+d x)}}\) |
\(\Big \downarrow \) 220 |
\(\displaystyle \frac {\text {arctanh}\left (\frac {\sin (c+d x)}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{d}-\frac {\sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {1-\cos (c+d x)}}\) |
ArcTanh[Sin[c + d*x]/(Sqrt[1 - Cos[c + d*x]]*Sqrt[Cos[c + d*x]])]/d - (Sqr t[Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[1 - Cos[c + d*x]])
3.3.70.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_.) + (d_.)*sin[(e_.) + ( f_.)*(x_)])^(n_), x_Symbol] :> Simp[-2*b*Cos[e + f*x]*((c + d*Sin[e + f*x]) ^n/(f*(2*n + 1)*Sqrt[a + b*Sin[e + f*x]])), x] + Simp[2*n*((b*c + a*d)/(b*( 2*n + 1))) Int[Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[n, 0] && IntegerQ[2*n]
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[-2*(b/f) Subst[Int[1/(b + d*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]))], x ] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Time = 13.25 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.69
method | result | size |
default | \(-\frac {\csc \left (d x +c \right ) \left (\cos \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}+\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}-\operatorname {arctanh}\left (\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\right )\right ) \sqrt {-2 \cos \left (d x +c \right )+2}\, \left (\sqrt {\cos }\left (d x +c \right )\right ) \sqrt {2}}{2 d \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\) | \(122\) |
-1/2/d*csc(d*x+c)*(cos(d*x+c)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)+(cos(d*x+c )/(1+cos(d*x+c)))^(1/2)-arctanh((cos(d*x+c)/(1+cos(d*x+c)))^(1/2)))*(-2*co s(d*x+c)+2)^(1/2)*cos(d*x+c)^(1/2)/(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*2^(1/ 2)
Time = 0.30 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.54 \[ \int \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)} \, dx=-\frac {2 \, {\left (\cos \left (d x + c\right ) + 1\right )} \sqrt {-\cos \left (d x + c\right ) + 1} \sqrt {\cos \left (d x + c\right )} - \log \left (-\frac {2 \, {\left (\cos \left (d x + c\right ) + 1\right )} \sqrt {-\cos \left (d x + c\right ) + 1} \sqrt {\cos \left (d x + c\right )} + {\left (2 \, \cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right )}{\sin \left (d x + c\right )}\right ) \sin \left (d x + c\right )}{2 \, d \sin \left (d x + c\right )} \]
-1/2*(2*(cos(d*x + c) + 1)*sqrt(-cos(d*x + c) + 1)*sqrt(cos(d*x + c)) - lo g(-(2*(cos(d*x + c) + 1)*sqrt(-cos(d*x + c) + 1)*sqrt(cos(d*x + c)) + (2*c os(d*x + c) + 1)*sin(d*x + c))/sin(d*x + c))*sin(d*x + c))/(d*sin(d*x + c) )
\[ \int \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)} \, dx=\int \sqrt {1 - \cos {\left (c + d x \right )}} \sqrt {\cos {\left (c + d x \right )}}\, dx \]
Leaf count of result is larger than twice the leaf count of optimal. 966 vs. \(2 (64) = 128\).
Time = 0.40 (sec) , antiderivative size = 966, normalized size of antiderivative = 13.42 \[ \int \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)} \, dx=\text {Too large to display} \]
1/8*(4*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^ (1/4)*((cos(d*x + c) + 1)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2* c) + 1)) + sin(d*x + c)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))) - log(sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + sq rt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)*sin(1 /2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + 2*(cos(2*d*x + 2*c )^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(s in(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + 1) + log(sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2 *c)^2 + 2*cos(2*d*x + 2*c) + 1)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d* x + 2*c) + 1))^2 - 2*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d* x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1 )) + 1) - log(((cos(d*x + c)^2 + sin(d*x + c)^2)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + (cos(d*x + c)^2 + sin(d*x + c)^2)*sin( 1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2)*sqrt(cos(2*d*x + 2 *c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1) + 2*(cos(2*d*x + 2*c) ^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(d*x + c)*cos( 1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + sin(d*x + c)*sin...
\[ \int \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)} \, dx=\int { \sqrt {-\cos \left (d x + c\right ) + 1} \sqrt {\cos \left (d x + c\right )} \,d x } \]
Timed out. \[ \int \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)} \, dx=\int \sqrt {\cos \left (c+d\,x\right )}\,\sqrt {1-\cos \left (c+d\,x\right )} \,d x \]